package com.lzb.web.controller;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;

public abstract class BaseController {

	private static final Logger logger = LoggerFactory.getLogger(BaseController.class);
	
	@ExceptionHandler
    public String exception(HttpServletRequest request, Exception e) {
		logger.error("报错！！", e);
        request.setAttribute("exceptionMessage", e.getMessage());  
        return "/resources/global/jsp/error";  
    }
}